/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;

/**
 *
 * @author wei
 */
@Entity
public class LocationQuantityEntity extends DataObjectEntity implements Serializable {
    @ManyToOne
    private LocationEntity location;
    @ManyToOne
    private RawMaterialsLocationEntity rawMaterialsLocation;
    private String type;
    private int quantity;
    @ManyToOne
    private InventoryEntity inventory;

    public LocationQuantityEntity() {
        super();
        this.setArchived(false);
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public RawMaterialsLocationEntity getRawMaterialsLocation() {
        return rawMaterialsLocation;
    }

    public void setRawMaterialsLocation(RawMaterialsLocationEntity rawMaterialsLocation) {
        this.rawMaterialsLocation = rawMaterialsLocation;
    }

    public InventoryEntity getInventory() {
        return inventory;
    }

    public void setInventory(InventoryEntity inventory) {
        this.inventory = inventory;
    }

    public LocationEntity getLocation() {
        return location;
    }

    public void setLocation(CompletedGoodsLocationEntity location) {
        this.location = location;
    }
    
    public void setLocation(RawMaterialsLocationEntity location) {
        this.location = location;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    @Override
    public String childToString() {
        return "LocationQuantityEntity{" + "location=" + location + ", quantity=" + quantity + '}';
    }
    
}
